//
//  WZGShareOrderPayGoodsCell.m
//  weizhegou
//
//  Created by sujeking on 2020/3/28.
//  Copyright © 2020 Facebook. All rights reserved.
//

#import "WZGShareOrderPayGoodsCell.h"
#import <UIImageView+WebCache.h>
@interface WZGShareOrderPayGoodsCell()

@property (weak, nonatomic) IBOutlet UIImageView *imv;
@property (weak, nonatomic) IBOutlet UILabel *numlabel;
@property (weak, nonatomic) IBOutlet UILabel *namelabel;
@property (weak, nonatomic) IBOutlet UILabel *pricelabel;

@end


@implementation WZGShareOrderPayGoodsCell

- (void)awakeFromNib {
    [super awakeFromNib];
    [self setupSubViews];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setupSubViews {
  self.selectionStyle = UITableViewCellSelectionStyleNone;
}

- (void)setDict:(NSDictionary *)dict {
  if (dict == nil) {
    return;
  }
  _dict = dict;
  [self.imv sd_setImageWithURL:[NSURL URLWithString:[dict valueForKey:@"goods_thumb"]] placeholderImage:nil options:SDWebImageRefreshCached];
  self.namelabel.text = [dict valueForKey:@"goods_name"];
  self.numlabel.text = [NSString stringWithFormat:@"x%@",[dict valueForKey:@"nums"]];
}

- (void)setPrice:(NSString *)price {
  _price = price;
  self.pricelabel.text = [NSString stringWithFormat:@"￥%@",price];
}

@end
